//
//  BaseViewController.m
//  JobHuntingFast
//
//  Created by haibo chen on 14-10-13.
//  Copyright (c) 2014年 haibo chen. All rights reserved.
//

#define kTopMargin_BottomBtn   10
#define kLeftMargin_BottomBtn   10
#define kBottomMargin_BottomBtn   (ISIPhoneX ? kBottomSafeArea_IPHONEX : 10)
#define kWidth_SingleBottomBtn   (SCREEN_WIDTH-2*kLeftMargin_BottomBtn)
#define kHeight_BottomBtn   40
#define kRadius_BottomBtn   5

#define kSapce_DoubleBottomBtn  9.5
#define kWidth_DoubleBottomBtn   ((SCREEN_WIDTH-2*kLeftMargin_BottomBtn-kSapce_DoubleBottomBtn)/2.0)

#define BottomBarViewHeight (kTopMargin_BottomBtn+kHeight_BottomBtn+kBottomMargin_BottomBtn)

#import "BasedViewController.h"
#import <HZUtilSet/CommonTools.h>
#import "Runner-Swift.h"
@interface BasedViewController ()


@end

@implementation BasedViewController
+ (void)loaded {
    
}
- (void)viewDidLoad {
    [super viewDidLoad];
    self.automaticallyAdjustsScrollViewInsets=NO;
    self.view.backgroundColor=[UIColor whiteColor];
    if ([self respondsToSelector:@selector(edgesForExtendedLayout)])
        self.edgesForExtendedLayout = UIRectEdgeNone;
}

- (void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
}

- (void)viewWillDisappear:(BOOL)animated{
    [super viewWillDisappear:animated];
}

-(void)viewDidAppear:(BOOL)animated{
    [super viewDidAppear:animated];
    [HZTRouter excuteBackResultCallbackForContext:self];
}

-(void)viewDidDisappear:(BOOL)animated{
    [super viewDidDisappear:animated];
}
-(void)dealloc{
    [[NSNotificationCenter defaultCenter] removeObserver:self];
    [HZTRouter clearBackResultMapForContext:self];
    BTLogInfo(@"===>%s销毁", object_getClassName(self));
}
+ (void)handleOpenUrlVc:(UIViewController *)vc routerParameters:(NSDictionary *)routerParameters{
    [HZTPathManager handleOpenUrlVc:vc routerParameters:routerParameters navContainer:AppConfig.shared.rootNav];
}

#pragma mark scrollview
- (UIStatusBarStyle)preferredStatusBarStyle {
    if (self.customStatusBarStyleBlock) {
        return self.customStatusBarStyleBlock();
    }else{
        return UIStatusBarStyleDefault;
    }
}
//是否可以旋转
- (BOOL)shouldAutorotate{
    return YES;
}
//支持方向
-(UIInterfaceOrientationMask)supportedInterfaceOrientations{
    return UIInterfaceOrientationMaskPortrait;
}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
    
}
@end
